import { Http } from "@/utils/request";
import { Toast } from "@/utils/toast";
import { delayTask } from "@/utils/timer";

const baseUrl = "/tour_info";

export const get_identity_type_list_api = (showError = true) => {
  return Http.get<{ identity_type: any[] }>(
    `/v1${baseUrl}/get_identity_type_list`
  ).catch((error: Error) => {
    showError && delayTask(60, () => Toast.show(error.message));
    return Promise.reject(error);
  });
};
